#include <errno.h>
#include "syscall.h"

typedef char * caddr_t;

extern "C" caddr_t sbrk(int incr)
{
	caddr_t prev_heap_end;
	__asm__ __volatile__(
		"mov %1, %%ebx\t\n"
		"int $0x90\t\n"
		"mov %%eax, %0"
		:"=m"(prev_heap_end):"m"(incr), "a"(SYSCALL_SBRK)
	);
	return prev_heap_end;
}

